home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 255 / SOMC Family Forum 255.iso / somc / BBucket.dir / 00002_Script_2 < prev    next >
Text File  |  1998-09-14  |  2KB  |  69 lines

  1.  
  2. on enterframe
  3.   global redo
  4.   if redo then
  5.     reset()
  6.     set redo to FALSE
  7.   end if
  8. end
  9.  
  10. on exitframe
  11.   global score,castpic,Vspeed,level,lives,lastspeed,SPEEDUP
  12.   -- move sprite
  13.   set the locV of sprite 6 to (the locV of sprite 6 + (Vspeed * level))
  14.   updateStage
  15.   if (the locV of sprite 6 > 320)  then   -- check if at the bottom
  16.     set the visible of sprite 6 to FALSE
  17.     if not(Vspeed = SPEEDUP) then  -- check that the down arrow was not used
  18.       upscore()
  19.     end if
  20.     if Vspeed = SPEEDUP then
  21.       set Vspeed to lastspeed    --reset the speed back
  22.     end if    
  23.     set castpic to (random (5) + 12) -- get new falling object
  24.     set the memberNum of sprite 6 to castpic
  25.     set the locV of sprite 6 to 18
  26.     set the locH of sprite 6 to 320
  27.     updateStage
  28.     set the visible of sprite 6 to TRUE 
  29.   end if
  30.   go to the frame
  31. end
  32.  
  33.  
  34. on keyDown
  35.   global Vspeed,castpic,lastspeed,SPEEDUP
  36.   set ARROW to the keycode
  37.   
  38.   case ARROW of
  39.     125:-- down arrow
  40.       set lastspeed to Vspeed   -- save speed
  41.       set Vspeed to SPEEDUP
  42.       repeat while (the locV of sprite 6 < 250)
  43.         set the locV of sprite 6 to (the locV of sprite 6 + Vspeed )
  44.         updateStage
  45.       end repeat      
  46.       
  47.       upscore()      
  48.     123:--left arrow
  49.       set the locH of sprite 6 to (the locH of sprite 6 - 130)
  50.       if the locH of sprite 6 < 80 then 
  51.         set the locH of sprite 6 to 70
  52.         --        beep
  53.       end if
  54.     124:-- right arrow
  55.       set the locH of sprite 6 to (the locH of sprite 6 + 130)
  56.       if the locH of sprite 6 > 570 then 
  57.         set the locH of sprite 6 to 570
  58.         --        beep
  59.       end if
  60.     12:
  61.       quit
  62.     otherwise:
  63.       beep
  64.   end case
  65.   updateStage
  66. end keyDown
  67.  
  68.  
  69.